The invention relates to a method for decoding optical information arranged in an image, acquired by an optical information reader.
In particular, the invention relates to a method for accelerating the decoding of optical information, both when the reader is a device of portable type held by an operator and when the reader is of fixed type, and i.e. connected to a resting base the position of which does not vary over time during operation of the reader.
The optical information readers comprise an image acquisition “optical apparatus”, i.e. an optoelectronic apparatus provided with an array of photosensitive elements of the CCD or CMOS type, that is able to acquire images of a framed object. A controlling device, for example a microprocessor, is integrated into the optical apparatus, to command the acquisition of images and process said images, in order to extract from such images geometrical features of the object and/or of a framed label or optical information, associated with this object or with this label.
The phrase “optical information” means any graphic representation that constitutes a piece of information, whether it be non-coded or coded.
For example, non-coded optical information may comprise graphic forms that include printed or hand-written characters (letters, numbers, etc) and particular “patterns”, such as, for example stamps, logos, signatures, fingerprints, etc and any detectable graphic representation, not only in the field of visible light, but also along the entire spectrum comprised between infrared and ultraviolet.
Encoded optical information may on the other hand comprise an “optical code”, i.e. a set of graphic signs placed on a label or directly on a product, by means of which information is associated with a surface divided into white, black or coloured elementary cells, arranged in one or more directions.
Symbologies of various type are known that are associated with an optical code, developed in order to gather significant data from a plurality of different objects. The first symbologies used were linear symbologies, which were thus called because the data of a symbol extend along a single axis or direction by a succession of black bars and white spaces. One example if these types of symbologies are, for example EAN/UPC, CODE 128 and CODE 39. Recently, two-dimensional symbologies have also become affirmed, which encode the data of a two-dimensional surface. Some two-dimensional symbologies, including the most common on the market are PDF-417, QR Code or Aztec. Two-dimensional codes of different symbologies can differ in terms of shape (for example square or rectangular) of the symbology, and/or through the type of data encoding (for example a matrix or stacked barcode arrangement), and/or by the quantity of stored data.
It should be noted that acquiring the image, identifying the optical information in the image and subsequent decoding of this optical information are operations conducted by the controlling device of the optical apparatus that have a different outcome, depending on the value assumed by functional parameters that are associable both with the optical apparatus and with the controlling device, which are settable at the moment of acquisition of an image and of decoding the optical information contained in this image.
Such settable functional parameters can be optical acquisition parameters that are associable with the optical apparatus to improve the acquisition of the image, such as, for example, adjusting focusing, exposition time and lighting intensity. Other functional parameters, which are on the other hand associable with the controlling device, are those that determine the processing mode for processing the image, including the symbology to be used to decode coded optical information. For example, one parameter can be considered to be the type of filtering for the purpose of improving the image, another parameter the localisation position of the optical code inside the image, the type of symbology 1D or 2D to be used, and which specific symbology to choose from the existing symbologies 1D or 2D. A further parameter is, for example the decoding algorithm to be selected for the symbology in question, there existing in fact for the same symbology algorithms that are fast but are not very tolerant of possible deformations and/or damages to the portion of image in which the coded information is arranged and there exist other algorithms that are more complex and slower, which are nevertheless able to analyse coded information even when the latter are arranged in non-ideal acquired images.
The set of the values assumed by such settable functional parameters thus determines the image-processing mode and thus different instances of this set correspond to different processing modes, each specific for a respective application of the optical information reader. For example, a first processing mode will be specific, and thus optimised from the point of view of the time required to decode the encoded optical information, to read a linear symbology arranged centrally in the acquired image, a second processing mode will instead by optimised to read a centrally arranged two-dimensional code, and a third processing mode will be able to read a two-dimensional code arranged in a reflective surface. Nevertheless, one of the increasingly appreciated features in optical information readers is the flexibility of use, i.e. the capacity of decoding optical information in different conditions. For information that is an optical code this flexibility of use means having the possibility of reading several optical codes of different types, for example different optical symbologies, in different environmental conditions, for example when illuminated with differing lighting intensity, with the optical codes arranged in any position in the acquired image, for example centrally or laterally in the image.
Taking into consideration the typical use application of optical information readers, it is noted that the same reader can be used in a totally different manner inside the same application.
If an optical information reader is portable, it is intended to be held by an operator and the acquired images mainly have the optical code in a central position, in which the operator commands a reading after instinctively pointing the reader in such a manner that the optical code is approximately in the centre of the field of view.
The portable readers, can, however, be arranged in a fixed support in “stand mode” for automatic reading, i.e. in which it is the reader that automatically commands reading of the images to be acquired and the objects can be conveyed automatically in front of the reader or be quickly “swiped” by the operator in front of the sensor (“swipe scanner”). In this case, the operator does not need to hold the portable reader and has his hands free. When the portable readers are in “stand mode”, the optical code is not always arranged centrally in the acquired image. In fact, the quicker the object is made to move in front of the reader, the more the optical code can be arranged laterally in the acquired image or can even be only partially framed.
Also, the same optical information reader has to be able to read different types of symbologies. In a supermarket for example, in which the reader is positioned in “stand mode” and reads linear EAN/UPC symbologies, it may, for example, be necessary to read an optical 2D code to check the age of a customer buying alcohol. Or, in an airport a reader has to be able to read both a boarding card PDF-417 and an electronic boarding pass received by a passenger in the form of an Aztec Code.
Further, the same optical information reader can be usable by several different operators. The first operator can use the reader to read a first symbology and occasionally a second and a third symbology, the second operator may on the other hand need to read regularly a fourth symbology and only occasionally the second and a fifth symbology.
As a result, a problem that is very much felt in optical information readers is the selection criterion of the processing mode chosen during the work phase of the reader, from processing modes provided a priori for the reader, in order to reduce the time required to read coded information. In certain “unattended” applications in which the type of code is standardised and/or the acquisition modes (distance, lighting, environment) are repetitive, it is known to put before a reading step a learning step in which an expert operator “trains” the reader for example by presenting a series of typical codes/labels and adjusting consequently the settable functional parameters. In this training step the expert user thus adjusts the settable acquisition/control functional parameters, trying to optimise the parameters on the type of training images that are presented to him and thus establishes a priori the possible processing modes corresponding to the preset functional parameters. In this training step a preferred processing mode is also defined. During the work phase, if the preferred processing mode is unsuccessful because optical information is not decoded, for example the optical code is not decoded, the remaining processing modes are used according to a preset order.
On the other hand, in the case of portable readers with non-repetitive reading conditions that and are used by users who are not expert users, the variability in the conditions of use and the impossibility of implementing the acquisition parameters makes the training step disclosed above difficult. In this case, it is known to store in the reader a set of possible processing modes and to associate with said set a preset order of execution of said processing modes from a preferred execution mode. When the reader is in the work phase, all the different possible processing modes are run in succession until the optical code is decoded. The processing mode caused successful decoding of the optical code becomes the preferred processing mode and thus the one that is first applied for the subsequent acquisition of an image. The preset order of execution is maintained.
U.S. Pat. No. 6,454,168 discloses a decoding method of coded information for a portable reader, which provides a training step even in the absence of an expert operator. In a training step of the reader, the controlled device stores which of the selected processing modes has had more success in order to establish an order of execution of the selected processing modes to be used at the end of the training step, i.e. when the reader is in the work phase. The selection criterion of the processing mode is not established a priori but is optimised according to what was learnt during the training step.
It is observed that the order of execution of the processing modes established before the work phase, as disclosed by U.S. Pat. No. 6,454,168, ensures rapid decoding of the most frequent coded information when, for example there is a prevalent symbology but it creates numerous drawbacks when, for example, a portable reader has to decode coded information relating to a plurality of symbologies, all of which are probable in the same manner and which are presented to the reader, in batches, in sequence.
The portable reader will in fact try to decode the coded information by running at each decoding the processing mode according to the preset order and thus attempting in vain, for example, a first and a second processing mode before going on to the third mode, the decoding of which could instead end successfully.
As the optical information reader does not produce a valid result during the decoding attempts, the lengthy processing time is perceived by the user as a slowing in the operation of the reader itself, if the reader is portable.
If, on the other hand, the reader is in “stand mode” and the object is made to transit quickly in front of the reader, the processing time can become greater than this transit time and thus processing may no longer be keeping up with acquisition.
Even if the controlling device is provided with an acquisition buffer for storing the images awaiting processing, few images can be acquired in the short time of transit of the object in front of the reader and significant images can thus be lost that are no longer storable in the acquisition buffer, which prevent decoding of the optical code.
One object of the invention is to overcome defects of known decoding methods.
A further object is to provide a decoding method for coded information that guarantees great acquisition flexibility and at the same time minimises the time required for decoding without a specific training step being required.
Another object is to provide a decoding method that can be advantageously usable for optical information readers intended for applications and uses that can vary over time or from one user to another.
Such objects and also others are all achieved by a decoding method for decoding optical information as defined in one or more of the claims set out below.